{"ast":null,"code":"var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport RcSwitch from 'rc-switch';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport SizeContext from '../config-provider/SizeContext';\nimport warning from '../_util/warning';\nimport Wave from '../_util/wave';\nimport useStyle from './style';\nconst Switch = /*#__PURE__*/React.forwardRef((_a, ref) => {\n  var {\n      prefixCls: customizePrefixCls,\n      size: customizeSize,\n      disabled: customDisabled,\n      loading,\n      className = ''\n    } = _a,\n    props = __rest(_a, [\"prefixCls\", \"size\", \"disabled\", \"loading\", \"className\"]);\n  process.env.NODE_ENV !== \"production\" ? warning('checked' in props || !('value' in props), 'Switch', '`value` is not a valid prop, do you mean `checked`?') : void 0;\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const size = React.useContext(SizeContext);\n  // ===================== Disabled =====================\n  const disabled = React.useContext(DisabledContext);\n  const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;\n  const prefixCls = getPrefixCls('switch', customizePrefixCls);\n  const loadingIcon = /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-handle`\n  }, loading && /*#__PURE__*/React.createElement(LoadingOutlined, {\n    className: `${prefixCls}-loading-icon`\n  }));\n  // Style\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const classes = classNames({\n    [`${prefixCls}-small`]: (customizeSize || size) === 'small',\n    [`${prefixCls}-loading`]: loading,\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className, hashId);\n  return wrapSSR( /*#__PURE__*/React.createElement(Wave, null, /*#__PURE__*/React.createElement(RcSwitch, Object.assign({}, props, {\n    prefixCls: prefixCls,\n    className: classes,\n    disabled: mergedDisabled,\n    ref: ref,\n    loadingIcon: loadingIcon\n  }))));\n});\nSwitch.__ANT_SWITCH = true;\nif (process.env.NODE_ENV !== 'production') {\n  Switch.displayName = 'Switch';\n}\nexport default Switch;","map":{"version":3,"names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","LoadingOutlined","classNames","RcSwitch","React","ConfigContext","DisabledContext","SizeContext","warning","Wave","useStyle","Switch","forwardRef","_a","ref","prefixCls","customizePrefixCls","size","customizeSize","disabled","customDisabled","loading","className","props","process","env","NODE_ENV","getPrefixCls","direction","useContext","mergedDisabled","loadingIcon","createElement","wrapSSR","hashId","classes","assign","__ANT_SWITCH","displayName"],"sources":["/data/messenger.client/node_modules/antd/es/switch/index.js"],"sourcesContent":["var __rest = this && this.__rest || function (s, e) {\n  var t = {};\n  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n  if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n  }\n  return t;\n};\nimport LoadingOutlined from \"@ant-design/icons/es/icons/LoadingOutlined\";\nimport classNames from 'classnames';\nimport RcSwitch from 'rc-switch';\nimport * as React from 'react';\nimport { ConfigContext } from '../config-provider';\nimport DisabledContext from '../config-provider/DisabledContext';\nimport SizeContext from '../config-provider/SizeContext';\nimport warning from '../_util/warning';\nimport Wave from '../_util/wave';\nimport useStyle from './style';\nconst Switch = /*#__PURE__*/React.forwardRef((_a, ref) => {\n  var {\n      prefixCls: customizePrefixCls,\n      size: customizeSize,\n      disabled: customDisabled,\n      loading,\n      className = ''\n    } = _a,\n    props = __rest(_a, [\"prefixCls\", \"size\", \"disabled\", \"loading\", \"className\"]);\n  process.env.NODE_ENV !== \"production\" ? warning('checked' in props || !('value' in props), 'Switch', '`value` is not a valid prop, do you mean `checked`?') : void 0;\n  const {\n    getPrefixCls,\n    direction\n  } = React.useContext(ConfigContext);\n  const size = React.useContext(SizeContext);\n  // ===================== Disabled =====================\n  const disabled = React.useContext(DisabledContext);\n  const mergedDisabled = (customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled) || loading;\n  const prefixCls = getPrefixCls('switch', customizePrefixCls);\n  const loadingIcon = /*#__PURE__*/React.createElement(\"div\", {\n    className: `${prefixCls}-handle`\n  }, loading && /*#__PURE__*/React.createElement(LoadingOutlined, {\n    className: `${prefixCls}-loading-icon`\n  }));\n  // Style\n  const [wrapSSR, hashId] = useStyle(prefixCls);\n  const classes = classNames({\n    [`${prefixCls}-small`]: (customizeSize || size) === 'small',\n    [`${prefixCls}-loading`]: loading,\n    [`${prefixCls}-rtl`]: direction === 'rtl'\n  }, className, hashId);\n  return wrapSSR( /*#__PURE__*/React.createElement(Wave, null, /*#__PURE__*/React.createElement(RcSwitch, Object.assign({}, props, {\n    prefixCls: prefixCls,\n    className: classes,\n    disabled: mergedDisabled,\n    ref: ref,\n    loadingIcon: loadingIcon\n  }))));\n});\nSwitch.__ANT_SWITCH = true;\nif (process.env.NODE_ENV !== 'production') {\n  Switch.displayName = 'Switch';\n}\nexport default Switch;"],"mappings":"AAAA,IAAIA,MAAM,GAAG,IAAI,IAAI,IAAI,CAACA,MAAM,IAAI,UAAUC,CAAC,EAAEC,CAAC,EAAE;EAClD,IAAIC,CAAC,GAAG,CAAC,CAAC;EACV,KAAK,IAAIC,CAAC,IAAIH,CAAC,EAAE,IAAII,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACP,CAAC,EAAEG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